package com.tuanzi.loan.web.lazy.galaxycard;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.galaxycard.GalaxyCardUserPrivilegeSearchRequest;
import com.tuanzi.loan.vo.response.galaxycard.GalaxyCardUserPrivilegeSearchResponse;
import com.tuanzi.loan.business.service.galaxycard.GalaxyCardUserPrivilegeService;

/**
 * 银河黑卡用户权益 DataModel
 * @author JinRuiyang 2018/1/9 14:32:29
 */
public class GalaxyCardUserPrivilegeDataModel extends
        BaseLazyDataModel<GalaxyCardUserPrivilegeSearchRequest, GalaxyCardUserPrivilegeSearchResponse> {

    private GalaxyCardUserPrivilegeService galaxycarduserprivilegeService = SpringContextHolder.getBean(GalaxyCardUserPrivilegeService.class);

    public GalaxyCardUserPrivilegeDataModel(GalaxyCardUserPrivilegeSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<GalaxyCardUserPrivilegeSearchResponse> doLoad(PageSearcher<GalaxyCardUserPrivilegeSearchRequest> pageSearcher) {
        return galaxycarduserprivilegeService.list(pageSearcher);
    }
}
